package com.he.hsdyc.designmodule.factory.standard;

import com.he.hsdyc.designmodule.factory.simple.Sender;

public class FactoryTest {

    public static void main(String[] args) {
        SendFactory factory = new SendFactory();
        Sender sender = factory.produceMail();
        sender.Send();

        //静态工厂模式
//        Sender sender = SendFactory.produceMail();
//        sender.Send();
    }
}


//工厂模式
//就是将简单工厂模式在工厂里类的创建方式if new 更改为工厂里的方法创建